UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/iWsQNlszLIrfOfKgLNuLWRwHgJfpypX2TA+m5gnGdk='
WHERE
key_id = '28fd1ffbd89670c86b5f7fa72ca48c1f1e70f2f8fdcb2487199705a7579a6a6d'
AND (
token = '/iWsQNlszLIrfOfKgLNuLWRwHgJfpypX2TA+m5gnGdk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)