UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LS0/MDHjpajZoMASWbpPWywu4Lp2TmsMKcEg2RvSyBk='
WHERE
key_id = '28fbb6500a74ac4da26c7e382c6372540b4ec40d3107120a3fc4742c5700b3be'
AND (
token = 'LS0/MDHjpajZoMASWbpPWywu4Lp2TmsMKcEg2RvSyBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)