UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XmrPSTTmjeyPjChuPkRFFwacL4sX4eDvaD8gUJatqnI='
WHERE
key_id = '2e86b5e79f48fad6f63f26015ffdddce93a59f79e38d0be44cc2486a61ea09c2'
AND (
token = 'XmrPSTTmjeyPjChuPkRFFwacL4sX4eDvaD8gUJatqnI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)