UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WuWIwm/cjxixbES3YTnjSfLnzIPuwovp+CAx3jb9Ah8='
WHERE
key_id = '0f0f93ca700a07fadcac6d877588894f6eba8de6b2f1318ee6e96f42fd87f31f'
AND (
token = 'WuWIwm/cjxixbES3YTnjSfLnzIPuwovp+CAx3jb9Ah8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)