UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WbTUSGWYynAEnhkJLL948ZQOZ/0j0ebhJ2bhbnzkbQo='
WHERE
key_id = '8b2f0528ba7a54a9632791638141c72ea8254737acef060b62aab31f72bb0620'
AND (
token = 'WbTUSGWYynAEnhkJLL948ZQOZ/0j0ebhJ2bhbnzkbQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)