UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3bGdosCa18T3RN+9aI1RGAah2f5Z3wMwhAurMp/khHI='
WHERE
key_id = 'bb60c1947ea3aa7c0ba42a03f22085dfdfba003ef272ad039db365f325388dc2'
AND (
token = '3bGdosCa18T3RN+9aI1RGAah2f5Z3wMwhAurMp/khHI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)