UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nU+cFJC7xSZDnTzOUTVX6Z0DLVkJp7T+31pM4jCKd4g='
WHERE
key_id = 'e4c0412db1afccf61c74de6a7f75f2544ef2adb41c3718df5e4db4229bba6827'
AND (
token = 'nU+cFJC7xSZDnTzOUTVX6Z0DLVkJp7T+31pM4jCKd4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)