UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/HhnNmMdIrp4FIT6TqAfLyATDspgTjS8MU6lD1k37aM='
WHERE
key_id = '18688a1993754964396bb215ab621d4dc6f0bbdb410686734e143005da3809e4'
AND (
token = '/HhnNmMdIrp4FIT6TqAfLyATDspgTjS8MU6lD1k37aM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)