UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+0/mODrdFQQeOG7cS7xNSzsxegBaGMReJb03b2Ryn4Q='
WHERE
key_id = '930e9424f5dfbbdd11c3895685799f13e8ff004352cfed95625a482311fe2cc0'
AND (
token = '+0/mODrdFQQeOG7cS7xNSzsxegBaGMReJb03b2Ryn4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)