UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3f6MMLRO4E8/6/xQ2N2/m+dDCtoYz7q0UzeosHEeU5g='
WHERE
key_id = '855e1cb9c6a4a1868ff3400054e66e13959d2c419b0e4628ca144296b5c1d7aa'
AND (
token = '3f6MMLRO4E8/6/xQ2N2/m+dDCtoYz7q0UzeosHEeU5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)