UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ML4KJaxTxmMozUIFEtDWuj1IegwKSR9E6ObdgbsafZA='
WHERE
key_id = '3f60f364887da3cf05e1674b54a5eed549db807dc6fa55eca1fb040a8865be3d'
AND (
token = 'ML4KJaxTxmMozUIFEtDWuj1IegwKSR9E6ObdgbsafZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)