UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3+3VsODY9BTQU19ek4Xd0eSTr7BAMHOoDbXkrBQk3a0='
WHERE
key_id = '968aeb26cd207d16e9b09d9c97fd1a0c429bcf54b0bd1d776dc14820014eb965'
AND (
token = '3+3VsODY9BTQU19ek4Xd0eSTr7BAMHOoDbXkrBQk3a0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)