UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mIR37p+rMH59mIeC84VQL+Cz9aVtZ5ROLBoVbVodCcY='
WHERE
key_id = 'f1f8c26e2cfb9f79115684f6d2c8487f15bd6022fa4d826de079de7ea3ea89d1'
AND (
token = 'mIR37p+rMH59mIeC84VQL+Cz9aVtZ5ROLBoVbVodCcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)