UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X72c2Rs4M0x8HLDbjHPc6H0wTaKmIEAQj+m3u/OhrCg='
WHERE
key_id = '25fb2babc78714a606aed83ccc25e1a0a0985a96eefcad7ec4d7a4c14b6aa4c6'
AND (
token = 'X72c2Rs4M0x8HLDbjHPc6H0wTaKmIEAQj+m3u/OhrCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)