UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BPrPjXP5Vz/DtzPzbLlhUPqCHqogP+H5TN+YzgOwIwU='
WHERE
key_id = '35012445a7cd48c889ead9203c900e2cef53c5df738034d1605c54e45e6cf00a'
AND (
token = 'BPrPjXP5Vz/DtzPzbLlhUPqCHqogP+H5TN+YzgOwIwU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)