UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OWj/l4SS+I9zq06Ax5r0uUsxWOECO16ct1j9QOLVCUU='
WHERE
key_id = '708f5348d0d7d1942a9ada67628156593c3f0988907f3420e77f5cb71eebb548'
AND (
token = 'OWj/l4SS+I9zq06Ax5r0uUsxWOECO16ct1j9QOLVCUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)