UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T/7x8+UR1ZZkKLV/2kwcpY0PX+fRnzndjKogn0KZnGI='
WHERE
key_id = '843d359ceb4c5759b61cafa6320408928a21b1498f479fe86d6913af8cba6d57'
AND (
token = 'T/7x8+UR1ZZkKLV/2kwcpY0PX+fRnzndjKogn0KZnGI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)