UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rdR/x82f++dJ+KdyFcT4rovl/NrpQIf26FPUGUgt2cM='
WHERE
key_id = '6291d411a9687b6ae8c44fff17b4d8d1f15d8ccd342bcc5a734938ae329b1429'
AND (
token = 'rdR/x82f++dJ+KdyFcT4rovl/NrpQIf26FPUGUgt2cM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)