UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lSuraBaIHbYhYoXeRww/ks4EvPCyJ4tfcy82gCwUQ+I='
WHERE
key_id = 'd4ea23f711d18fbe9c6969c82ab25b1c31cdc5f59bf093fc730bfaa77fdc9f6b'
AND (
token = 'lSuraBaIHbYhYoXeRww/ks4EvPCyJ4tfcy82gCwUQ+I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)