UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o25aUHHkAaY2eij0VYNabUUMm8h/zk8gNDVl0V9wAoQ='
WHERE
key_id = '563f09b1da784b92b8d5e3fb90798036ab68a3125624a5141a4a4bb0b5e6af66'
AND (
token = 'o25aUHHkAaY2eij0VYNabUUMm8h/zk8gNDVl0V9wAoQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)