UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zP3m8tgTeyjtPtawdRhXH6GAHzr3O7kMYfLPYiMRaEQ='
WHERE
key_id = '755cd078d9e95dca4887480e9971ab644e0b1d0a1da776ab50ac48513d7f9ec0'
AND (
token = 'zP3m8tgTeyjtPtawdRhXH6GAHzr3O7kMYfLPYiMRaEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)