UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fIhXTjOSRbcE6g8YiQ0zvz4E2+2ZS87qYcbqyVMfFQY='
WHERE
key_id = '0472eac17e0bffc776bebcc80d8c03a4f71cb7366195a6452809a826418825c2'
AND (
token = 'fIhXTjOSRbcE6g8YiQ0zvz4E2+2ZS87qYcbqyVMfFQY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)