UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UDLRlLJJBds8WnnRlCnwvvVbFF8plmjwNR6KbiqURQk='
WHERE
key_id = '074eaea6d5c98df69193ab853c4092b83837b6c408aa6ba06703ee882594acdb'
AND (
token = 'UDLRlLJJBds8WnnRlCnwvvVbFF8plmjwNR6KbiqURQk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)