UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z2HThirvT2mgTJ0ElIEY0sO6rq4LL6p+ue8+Pav7tO4='
WHERE
key_id = '2b43a92f04d776184bb9822f17f2afb5f8f3ff36317680bf553c662723d65a41'
AND (
token = 'z2HThirvT2mgTJ0ElIEY0sO6rq4LL6p+ue8+Pav7tO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)