UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e+Gbf2O/UGttBZ0EbCIL0Gyjc/vCWbspG7W+LgpsfXc='
WHERE
key_id = '0b098361e2393668e0ea30cfb31b6b241846530746a13961f673d2a2a41bd495'
AND (
token = 'e+Gbf2O/UGttBZ0EbCIL0Gyjc/vCWbspG7W+LgpsfXc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)