UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u6bZxshtogl8wFLC8VxEzUvxJKDw+Ws2X3/sH6bdP+M='
WHERE
key_id = '5abcc40a86cb18cb76c744704c6a6956cd0072c0f326f3e6e1c3e2b31266c08f'
AND (
token = 'u6bZxshtogl8wFLC8VxEzUvxJKDw+Ws2X3/sH6bdP+M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)